﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="productcategoryeditor.aspx.cs"
    Inherits="website_admin_insurance_productcategoryeditor" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>
        <%=pageTitle %>
    </title>
    <script type="text/javascript" src="../_static/_jQuery/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="../../admin/_static/_jQuery/jquery_validator.js"></script>
    <script type="text/javascript" language="javascript" src="../_common/scripts/util.js"></script>
    <script language="javascript" src="../_static/_jQuery/jquery-fileupload.js" type="text/javascript"></script>
    <script language="javascript" src="../_static/_jQuery/interface.js" type="text/javascript"></script>
    <link href="../_common/styles/form_v2_0.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" language="javascript">
        $(document).ready(function () {
            validator.setup("#form1", "");
            if ($("#dropCategory").val() == "00000000-0000-0000-0000-000000000000") {
                $("#trInnerCode").show();
            } else {
                $("#trInnerCode").hide();
            }
            $("#dropCategory").change(function () {
                if ($(this).val() == "00000000-0000-0000-0000-000000000000") {
                    $("#trInnerCode").show();
                } else {
                    $("#trInnerCode").hide();
                    $("#trInnerCode").val('');
                }
            });
        });

        function Verification() {
            var bl = validator.validatorAll();
            if ($("#dropCategory").val() == "00000000-0000-0000-0000-000000000000") {
                if ($("#txtInnerCode").val() == "") {
                    $("#txtInnerCode").showValidator("内部编号不允许为空", "../images/");
                    bl = false;
                } else {
                    $("#txtInnerCode").hidenValidator();
                }
            } else {
                $("#txtInnerCode").hidenValidator();
                $("#trInnerCode").hide();
            }
            return bl;
        }
    </script>
</head>
<body scrool="no" style="margin: 0px; padding: 0px; background: #F0F0F0;">
    <script type="text/javascript">
        <!--
        function __doPostBack(eventTarget, eventArgument) {
            var theForm = document.forms["Form1"];
            if (!theForm) {
                theForm = document.form1;
            }
            if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
                theForm.__EVENTTARGET.value = eventTarget;
                theForm.__EVENTARGUMENT.value = eventArgument;
                theForm.submit();
            }
        }
        // -->
    </script>
    <div id="success" style="position: absolute; z-index: 300; height: 130px; width: 284px;
        left: 50%; top: 50%; margin-left: -150px; margin-top: -80px;">
        <div style="position: absolute; z-index: 300; width: 270px; height: 90px; background-color: #FFFFFF;
            border: solid #6699CC 1px; font-size: 14px;">
            <div style="height: 64px; line-height: 150%; padding: 0px 3px 0px 3px;" align="center">
                <br />
                <table>
                    <tr>
                        <td valign="top">
                            <img border="0" src="../_imgs/admin/progress.gif" />
                        </td>
                        <td valign="middle" style="font-size: 14px; width: 150px;">
                            操作执行中 ...<br />
                        </td>
                    </tr>
                </table>
                <br />
            </div>
        </div>
        <div style="position: absolute; width: 270px; height: 108px; z-index: 299; left: 4px;
            top: 5px; background-color: #E8E8E8; border: #E8E8E8 1px solid; display: none;">
        </div>
    </div>
    <script type="text/javascript">
        document.getElementById("success").style.display = "none"; 
    </script>
    <script language="JavaScript1.2" src="../../_common/scripts/divcover.js" type="text/javascript"></script>
    <form name="form1" runat="server" id="form1">
    <input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
    <input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
    <input type="hidden" id="txtTypeCode" runat="server" value="1" />
    <input type="hidden" id="txtNumber" runat="server" />
    <table cellpadding="0" cellspacing="0" class="WIN-Form-Layout">
        <tr style="height: 32px;">
            <td colspan="1" class="WIN-Form-Title-Bar">
                <span>
                    <%=pageTitle %>
                    产品目录</span>
            </td>
        </tr>
        <tr style="height: 100%; background: #ffffff;">
            <td valign="top" style="padding: 10px 10px 10px 0px;">
                <div class="content">
                    <div class="checkoutBox noBorder" id="errorMsg" runat="server" style="background: #FFFDCF;
                        width: 762px; line-height: 21px; padding: 10px;" visible="false">
                    </div>
                    <div class="checkoutBox noBorder">
                        <div class="tabContainer">
                            <ul class="tabHead">
                                <li class="currentBtn"><a id="a21" href="javascript:void(0);" title="常规" rel="21">常规</a></li>
                            </ul>
                        </div>
                        <div class="clear">
                        </div>
                        <ul class="infoList edit" id="tab_21">
                            <li style="width: 100%; height: auto;">
                                <table class="stdTable" cellpadding="3" cellspacing="5" style="width: 90%; margin-left: 10px;">
                                    <colgroup>
                                        <col style="width: 115px; text-align: right;" />
                                        <col />
                                        <col style="width: 115px; text-align: right;" />
                                        <col />
                                    </colgroup>
                                    <tbody>
                                        <tr>
                                            <td>
                                                <label for="txtProductName">
                                                    <img src="../_imgs/admin/frm_required.gif" title="必选项" alt="必选项" />名称：</label>
                                            </td>
                                            <td colspan="3">
                                                <input type="text" id="txtProductName" class="textbox" runat="server" required="required"
                                                    controlname="名称" isvalidator />
                                            </td>
                                        </tr>
                                        <tr id="trInnerCode">
                                            <td>
                                                <label for="txtInnerCode">
                                                    <img src="../_imgs/admin/frm_required.gif" title="必选项" alt="必选项" />代码：</label>
                                            </td>
                                            <td>
                                                <input type="text" id="txtInnerCode" class="textbox" runat="server" required="required"
                                                    controlname="代码" isvalidator />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <label for="dropCategory">
                                                    <img src="../_imgs/admin/frm_required.gif" title="必选项" alt="必选项" />分类：</label>
                                            </td>
                                            <td colspan="3">
                                                <asp:DropDownList ID="dropCategory" runat="server" CssClass="SelectBox">
                                                    <asp:ListItem Text="+顶级目录" Value="00000000-0000-0000-0000-000000000000"></asp:ListItem>
                                                </asp:DropDownList>
                                                <input id="txtCategoryValue" runat="server" type="hidden" value="00000000-0000-0000-0000-000000000000" />
                                                <input type="hidden" id="txtOriginalParentId" runat="server" value="00000000-0000-0000-0000-000000000000" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <label for="selStatus">
                                                    <img src="../_imgs/admin/frm_required.gif" title="必选项" alt="必选项" />状态：</label>
                                            </td>
                                            <td>
                                                <select id="selStatus" runat="server" class="SelectBox">
                                                    <option value="0" selected>销售</option>
                                                    <option value="1">停售</option>
                                                </select>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <label for="txtLineNum">
                                                    <img src="../_imgs/admin/frm_required.gif" title="必选项" alt="必选项" />排序：</label>
                                            </td>
                                            <td>
                                                <input type="text" id="txtLineNum" class="textbox" runat="server" style="width: 60px;"
                                                    required="required" controlname="排序" datatype="number" isvalidator />
                                            </td>
                                            <td style="text-align: right;">
                                                <label for="cbxIsProtected">
                                                    系统保护类别：</label>
                                            </td>
                                            <td>
                                                <label for="cbxIsProtected">
                                                    <input type="checkbox" id="cbxIsProtected" name="cbxIsProtected" runat="server" />是</label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <label for="txtProtectItems">
                                                    保障明细：</label>
                                            </td>
                                            <td colspan="3">
                                                <textarea name="txtProtectItems" id="txtProtectItems" rows="5" runat="server" class="tbxReadOnly"></textarea>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <label><img src="../_imgs/admin/frm_required.gif" title="必选项" alt="必选项" />
                                                    覆盖地区：</label>
                                            </td>
                                            <td colspan="3">
                                                <span style="float: left;">
                                                    <input type="checkbox" id="cbxAreaCodeList_1" name="cbxAreaCodeList" runat="server" />
                                                    <label for="cbxAreaCodeList_1">
                                                        申根国家</label>
                                                </span> 
                                                <span style="float: left;">
                                                <input type="checkbox" id="cbxAreaCodeList_3" name="cbxAreaCodeList" runat="server" />
                                                <label for="cbxAreaCodeList_3">
                                                    西班牙</label>
                                                </span> 
                                                <span style="float: left;">
                                                <input type="checkbox" id="cbxAreaCodeList_2" name="cbxAreaCodeList" runat="server" />
                                                <label for="cbxAreaCodeList_2">
                                                    美加地区</label>
                                                </span> 
                                                <span style="float: left;">
                                                <input type="checkbox" id="cbxAreaCodeList_0" name="cbxAreaCodeList" runat="server" />
                                                <label for="cbxAreaCodeList_0">
                                                    其它地区</label>
                                                </span>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <label for="txtDescription">
                                                    备注信息：</label>
                                            </td>
                                            <td colspan="3">
                                                <textarea name="txtDescription" id="txtDescription" rows="3" runat="server" class="tbxReadOnly"></textarea>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </li>
                        </ul>
                        <div class="clear">
                        </div>
                    </div>
                </div>
            </td>
        </tr>
        <tr style="height: 55px;">
            <td class="WIN-Form-Bottom">
                <input type="button" value="保存并新建" id="btnSave" class="btn_o_120" onclick="if(Verification()){this.disabled=true;success.style.display='block';HideOverSels('success');__doPostBack('saveinfo', 'saveandnew');}" />
                <input id="Button3" runat="server" class="btn_o_120" value="保 存" type="button" onclick="if(Verification()){this.disabled=true;success.style.display='block';HideOverSels('success');__doPostBack('saveinfo','saveandclose');}" />
                <input type="button" value="关闭窗口" id="Button2" class="btn_o_120" onclick="window.close();" />
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
